{extend name="public:base"/}


{block name="title"}新增管理员{/block}
{block name="style"}{/block}

{block name="main"}

<section class="content">
    <div class="row">

        <div class="col-md-12">

            <div class="row">
                <div class="col-lg-12">
                    <div class="box">
                        <div class="box-header with-border">
                            <h3 class="box-title">新增管理员</h3>
                        </div>
                        <form  id="pt_form" method="post">
                            <div class="box-body">

                                <div class="clearfix"></div>

                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label class="control-label Validform_label" for="full_name">姓名</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="full_name" class="form-control" name="full_name" placeholder="姓名" datatype="*">
                                        <div class="help-block"></div>
                                    </div>
                                </div>


                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label class="control-label Validform_label" for="account">登录账号</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="account" class="form-control" name="account" placeholder="登录账号" datatype="*">
                                        <div class="help-block"></div>
                                    </div>
                                </div>


                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label class="control-label Validform_label" for="password">登录密码</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="password" id="password" class="form-control" name="password" placeholder="登录密码" datatype="*">
                                        <div class="help-block"></div>
                                    </div>
                                </div>


                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label class="control-label Validform_label" for="repassword">确认密码</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="password" id="repassword" class="form-control" name="repassword" placeholder="确认密码" datatype="*" recheck="password">
                                        <div class="help-block"></div>
                                    </div>
                                </div>


                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'><label class="control-label">是否启用</label></div>
                                    <div class='col-sm-10'>
                                        <input type="hidden" value="">
                                        <div id="article-status" role="radiogroup">
                                            <label>
                                                <input type="radio" name="status" value="1" checked>
                                                启用
                                            </label>

                                            <label>
                                                <input type="radio" name="status" value="0">
                                                禁用
                                            </label>
                                        </div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class='col-sm-2 text-right'>
                                        <label class="control-label" for="article-cate_id">选择角色</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <div class="kv-plugin-loading loading-article-cate_id">&nbsp;</div>
                                        <select id="article-cate_id" class="form-control" name="role_id"
                                                style="width: 1px; height: 1px; visibility: hidden;">
                                            <?php if(!empty($roleData)){ foreach($roleData as $role){?>
                                            <option value="<?=$role['id']?>"><?=$role['role_name']?></option>
                                            <?php }}?>
                                        </select>
                                        <div class="help-block"></div>
                                    </div>
                                </div>

                            </div>
                            <div class="box-footer text-center">
                                <button class="btn btn-primary" type="submit">保存</button>
                                <span class="btn btn-white" onclick="history.go(-1)">返回</span>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
{/block}

{block name="js"}
<script>
    jQuery(function ($) {
        window.select2_138e92d5 = {
            "allowClear": true,
            "theme": "krajee",
            "width": "100%",
            "placeholder": "请选择",
            "language": "zh-CN"
        };

        if (jQuery('#article-cate_id').data('select2')) {
            jQuery('#article-cate_id').select2('destroy');
        }
        jQuery.when(jQuery('#article-cate_id').select2(select2_138e92d5)).done(initS2Loading('article-cate_id', 's2options_d6851687'));
    });

    var validate = validator('#pt_form');

</script>
{/block}